<!--
 余额列表
 Created by xunyin 
 CopyRight 讯音云商（厦门）科技有限公司  www.tonetn.com
-->
<template>
	<view class="balanceList">
		<view class="balanceLi" v-for="(item,index) in balanceList" :key="index">
			<text>{{item.storeName}}</text>
			<text>￥{{item.userBalance}}</text>
		</view>
	</view>
</template>

<script>
	import { getStoreBalanceList } from '@/api/user'
	export default {
		data() {
			return {
				balanceList: [], // 余额列表
			}
		},
		onLoad() {
			this.getBalanceList()
		},
		methods: {
			getBalanceList() {
				let param = {
					//userId:this.userInfo.uid
				}
				getStoreBalanceList(param).then(res => {
					this.balanceList = res.data
				})
/* 				for (let i = 0; i <= 10; i++) {
					this.balanceList.push({
						name: "名称",
						money: 79
					})
				} */
			}
		}
	}
</script>

<style>
	page {
		background: #f8f8fa;
	}
</style>
<style lang="scss" scoped>
	.balanceList {
		width: 100%;
		height: auto;

		.balanceLi {
			width: calc(90% - 60rpx);
			height: auto;
			padding: 30rpx;
			background: #f8f8fa;
			box-shadow: 0px 0px 20rpx 0px rgba(0, 0, 0, 0.1);
			border-radius: 10rpx;
			margin: 20rpx auto 0;
			display: flex;
			justify-content: space-between;
			font-size: 28rpx;
		}

		.balanceLi>text:nth-child(1) {
			color: #333;
		}

		.balanceLi>text:nth-child(2) {
			color: #eb0707;
		}
	}
</style>
